package cjgl.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectionFactory {
	
	public static Connection getConnection() {
		
		Connection conn=null;
		try {
			Class.forName("com.mysql.jdbc.Driver");
			conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/cjgl?characterEncoding=utf-8", "root", "root");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return conn;
	}

	public static void setDbName(String dbName) {
	   
		
	}

	public static void setUsername(String username) {
		// TODO Auto-generated method stub
		
	}

	public static void setPassword(String password) {
		// TODO Auto-generated method stub
		
	}
}
